Network Requests

  • Sends HTTP network requests.

    BaseRequest is a simpler alternative to BMSURLSession that requires no familiarity with Swift’s URLSession API.

    When building a BaseRequest object, all components of the HTTP request must be provided in the initializer, except for the requestBody, which can be supplied as Data when sending the request via send(requestBody:completionHandler:).

    Important

    It is recommended to use the Request class instead of BaseRequest, since it will replace BaseRequest in the future.
    See more

    Declaration

    Swift

    open class BaseRequest: NSObject, URLSessionTaskDelegate
  • Sends HTTP network requests.

    Request is functionally equivalent to BaseRequest. For more information on how to use Request, see the documentation for BaseRequest.

    Declaration

    Swift

    open class Request: BaseRequest
  • Contains useful response data from an HTTP request made by the Request class.

    See more

    Declaration

    Swift

    public class Response
  • The HTTP method to be used in the Request class initializer.

    See more

    Declaration

    Swift

    public enum HttpMethod: String